From 1d1ddf78de8b0e23c86a0058472d42149999362c Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 8 May 2007 10:51:05 -0600 Subject: [PATCH] [IA64] Cleanup in faults.c Cleanup: more static added, unused functions removed, a typo fixed. Signed-off-by: Tristan Gingold --- xen/arch/ia64/xen/faults.c | 47 +++++--------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/xen/arch/ia64/xen/faults.c b/xen/arch/ia64/xen/faults.c index b886cdd94e..e33952eb54 100644 --- a/xen/arch/ia64/xen/faults.c +++ b/xen/arch/ia64/xen/faults.c @@ -54,8 +54,9 @@ extern IA64FAULT ia64_hypercall(struct pt_regs *regs); extern void do_ssc(unsigned long ssc, struct pt_regs *regs); // should never panic domain... if it does, stack may have been overrun -void check_bad_nested_interruption(unsigned long isr, struct pt_regs *regs, - unsigned long vector) +static void check_bad_nested_interruption(unsigned long isr, + struct pt_regs *regs, + unsigned long vector) { struct vcpu *v = current; @@ -74,8 +75,8 @@ void check_bad_nested_interruption(unsigned long isr, struct pt_regs *regs, } } -void reflect_interruption(unsigned long isr, struct pt_regs *regs, - unsigned long vector) +static void reflect_interruption(unsigned long isr, struct pt_regs *regs, + unsigned long vector) { struct vcpu *v = current; @@ -103,26 +104,6 @@ void reflect_interruption(unsigned long isr, struct pt_regs *regs, perfc_incra(slow_reflect, vector >> 8); } -static unsigned long pending_false_positive = 0; - -void reflect_extint(struct pt_regs *regs) -{ - unsigned long isr = regs->cr_ipsr & IA64_PSR_RI; - struct vcpu *v = current; - static int first_extint = 1; - - if (first_extint) { - printk("Delivering first extint to domain: isr=0x%lx, " - "iip=0x%lx\n", isr, regs->cr_iip); - first_extint = 0; - } - if (vcpu_timer_pending_early(v)) - printk("*#*#*#* about to deliver early timer to domain %d!!\n", - v->domain->domain_id); - PSCB(current, itir) = 0; - reflect_interruption(isr, regs, IA64_EXTINT_VECTOR); -} - void reflect_event(void) { struct vcpu *v = current; @@ -166,22 +147,6 @@ void reflect_event(void) PSCB(v, interrupt_collection_enabled) = 0; } -// ONLY gets called from ia64_leave_kernel -// ONLY call with interrupts disabled?? (else might miss one?) -// NEVER successful if already reflecting a trap/fault because psr.i==0 -void deliver_pending_interrupt(struct pt_regs *regs) -{ - struct domain *d = current->domain; - struct vcpu *v = current; - // FIXME: Will this work properly if doing an RFI??? - if (!is_idle_domain(d) && user_mode(regs)) { - if (vcpu_deliverable_interrupts(v)) - reflect_extint(regs); - else if (PSCB(v, pending_interruption)) - ++pending_false_positive; - } -} - static int handle_lazy_cover(struct vcpu *v, struct pt_regs *regs) { if (!PSCB(v, interrupt_collection_enabled)) { @@ -593,7 +558,7 @@ ia64_handle_reflection(unsigned long ifa, struct pt_regs *regs, unsigned long psr = regs->cr_ipsr; unsigned long status; - /* Following faults shouldn'g be seen from Xen itself */ + /* Following faults shouldn't be seen from Xen itself */ BUG_ON(!(psr & IA64_PSR_CPL)); switch (vector) { -- 2.30.2